<h1>Listing prefs</h1>

<table>
  <tr>
  <% for column in Pref.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for pref in @prefs %>
  <tr>
  <% for column in Pref.content_columns %>
    <td><%=h pref.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => pref %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => pref %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => pref }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @pref_pages.current.previous } if @pref_pages.current.previous %>
<%= link_to 'Next page', { :page => @pref_pages.current.next } if @pref_pages.current.next %> 

<br />

<%= link_to 'New pref', :action => 'new' %>
